package mest.dao.cxj;

import mest.VO.cxj.PlanCostorderVO;
import mest.VO.cxj.PlanOtherIncomeVO;
import mest.entity.PlanCostOrder;
import mest.entity.PlanOtherIncome;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface PlanOtherIncomeDao {


    /**
     * 添加计划收款单
     */
    Integer insertPlanOtherIncome(@Param("poi") PlanOtherIncome poi, @Param("theirDb") String theirDb);

    /**
     * 查询全部计划收款单
     * @return
     */
    List<PlanOtherIncomeVO> selectAllPlanOtherIncome(@Param("page") Integer page, @Param("limit") Integer limit,
                                                     @Param("status") Integer status, @Param("content") String content,
                                                     @Param("theirDb") String theirDb);


    /**
     * 收款单数量
     * @param theirDb
     * @return
     */
    Integer selectCountPlanOtherIncome(@Param("status") Integer status, @Param("content") String content,
                                     @Param("theirDb") String theirDb);

    /**
     * 将单据转完成状态
     */
    Integer changeStatus(@Param("id") Integer id, @Param("theirDb") String theirDb);


    /**
     * 修改计划收款单信息
     */
    Integer modifyPlanOtherIncome(@Param("poi") PlanOtherIncome poi, @Param("theirDb") String theirDb);


    /**
     *  获取计划费用单信息
     * @param id
     * @param theirDb
     * @return
     */
    PlanOtherIncome selectPlanOtherIncomeById(@Param("id")Integer id, @Param("theirDb")String theirDb);

    /**
     * 修改计划费用单金额
     * @param id
     * @param hasBennMoney
     * @param theirDb
     * @return
     */
    Integer updatePlanOtherIncomeByMoney(@Param("id")Integer id, @Param("hasBennMoney") BigDecimal hasBennMoney,
                                       @Param("theirDb")String theirDb);


}